home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 038a / multfax.zip / TRAPFAX.DOC < prev   
Text File  |  1993-02-23  |  6KB  |  125 lines

  1. This set of files was created to work with Quick Link II, but it should work 
  2. with any FAX receive program.  If your FAX receive program cannot be removed 
  3. after the FAX is received (as Quick Link can) other DESQview windows will 
  4. remain halted until you return.  But, at least, you got the FAX. 
  5.  
  6. I'll refer to the DESQview window where you intend to receive faxes as the 
  7. TrapFax window.  
  8.  
  9.   *  IMPORTANT  *  IMPORTANT  *  IMPORTANT  *  IMPORTANT  *  IMPORTANT  *  
  10. You must configure the TrapFax window so it will NOT share the CPU with 
  11. other windows.  2nd page of the Change a Program configuration screens 
  12. (Advanced Options).  The next to last entry on the bottom left.  "Share CPU 
  13. when foreground ....: [N]"  If you share time with other windows while 
  14. receiving a FAX, the FAX will fail.  That's the reason for this file set. 
  15.  
  16. Be sure TRAPFAX.BAT and all the files it runs, listed below, are in the same 
  17. directory.  This is essential, double check to make sure.
  18.  
  19. The following 19 lines makeup TRAPFAX.BAT
  20.  
  21. 1   :START
  22. 2   IF NOT EXIST GONEXT.EXE GOTO ErrorMessage
  23. 3   GONEXT
  24. 4   IF NOT EXIST CHK4RING.EXE GOTO ErrorMessage
  25. 5   CHK4RING com1 ps2n
  26. 6   IF errorlevel 50 GOTO END
  27. 7   IF NOT EXIST GOFRONT.EXE GOTO ErrorMessage
  28. 8   GOFRONT
  29. 9   IF NOT EXIST RECFAX.BAT GOTO ErrorMessage
  30. 10  CALL RECFAX
  31. 11  IF NOT EXIST KILLTIME.EXE GOTO ErrorMessage
  32. 12  KILLTIME 7
  33. 13  IF errorlevel 50 GOTO END
  34. 14  CALL RECFAX out
  35. 15  GOTO START
  36. 16  :ErrorMessage
  37. 17  @ECHO  File Not Found!      ^^^^^^
  38. 18  :END
  39. 19  GOFRONT
  40.  
  41.  
  42. 1  :START                  
  43. A location label that marks the beginning of the batch file
  44.  
  45. 2  IF NOT EXIST GONEXT.EXE GOTO ErrorMessage
  46. This line checks for the GONEXT utility.  If it is not found it goes to 
  47. line 16 which gives an error message and exits the batch file.  Lines 4, 7, 
  48. 9 and 11 do this same sort of thing. 
  49.  
  50. 3  GONEXT
  51. A utility that puts you in some other DesqView window.  If you remain in the 
  52. TrapFax window nothing else will operate, because it does not share the CPU 
  53. when in the foreground.  It does share the CPU while running in the 
  54. background.  This utility makes sure you don't forget and leave the TrapFax 
  55. window in the foreground after starting TRAPFAX.BAT.  Also, it returns 
  56. TrapFax to the background after a FAX has been received and the cycle has 
  57. begun again.  
  58.  
  59.  
  60. 5  CHK4RING com1 ps2n
  61. This utility watches for the phone to ring.  When it sees the phone ring it 
  62. exits, letting the batch file continue.  This is the only line in the 
  63. TRAPFAX.BAT you may need to modify if you use Quick Link II.  It requires 2 
  64. command line arguments.  The first is the com port your modem is on stated 
  65. as COM1, etc. The 2nd indicates whether your computer is IBM PS2 
  66. micro-channel architecture.  This is indicated by entering PS2N for no and 
  67. PS2Y for yes, it is a PS2.  If you don't know, try PS2N. 
  68.  
  69. 6  IF errorlevel 50 GOTO END 
  70. This line will abort the batch file if you made an error when running the 
  71. previous utility, or if you abort CHK4RING or KILLTIME.  
  72.  
  73. 8  GOFRONT
  74. This utility forces any DESQview window it's run in to the front 
  75. (foreground).  In this case it forces the TrapFax window to the foreground. 
  76. Remember, you MUST configure your TrapFax window so it will not share the 
  77. CPU when it is in the foreground.  
  78.  
  79. 10  CALL RECFAX 
  80. RECFAX is a batch file that comes with Quick Link II.  It loads the receive- 
  81. a-fax TSR.  If you are using a version of DOS earlier than 3.3 you do not 
  82. have the CALL command.  You will have to put the contents of RECFAX.BAT 
  83. directly in TRAPFAX.BAT in place of the CALL RECFAX line. 
  84.  
  85. 12  KILLTIME 7
  86. This utility waits for the number of seconds indicated in the command line 
  87. argument.  In this case 7 seconds.  This wait is necessary to give the 
  88. receive-a-fax TSR time to realize the phone is ringing, emerge (become 
  89. active) and answer the phone.  Once the TSR emerges, KILLTIME is suspended.  
  90. It takes more than 7 seconds for the receive-a-fax process; so, when the TSR 
  91. finishes and withdraws, KILLTIME sees that more than 7 seconds have elapsed 
  92. and ends immediately.  NOTE:  If a caller hangs up after the second ring, 
  93. and before the TSR answers, it will wait forever to answer.  It's rare, but 
  94. if it happens, it ties up the machine until you return, or until another 
  95. call comes in. 
  96.  
  97. 13  IF errorlevel 50 GOTO END
  98. See line 6.
  99.  
  100. 14  CALL RECFAX out
  101. This runs the Quick Link II batch file with the "out" argument, to remove 
  102. the receive FAX TSR from memory.  See the explanation for line 10 if your 
  103. version of DOS is earlier than 3.3.
  104.  
  105. 15  GOTO START
  106. This line loops back to the beginning (START:) of the batch file and starts 
  107. the process all over again.  This creates an endless loop that resets 
  108. everything back to the way it was before the phone rang.  The system is 
  109. ready to receive the next FAX, and the other windows are running (multi- 
  110. tasking).  Pressing Esc will abort CHK4RING or KILLTIME, and exit 
  111. TRAPFAX.BAT.  You can also stop the process by closing the TrapFax window, 
  112. or pressing Control-C or Control-Break repeatedly.  
  113.  
  114. 16  :ErrorMessage
  115. 17  @ECHO  File Not Found!      ^^^^^^
  116. Displays this error message if the IF test in line 2, 4, 7, 9 or 11 fails.
  117.  
  118. 18  :END
  119. Quits the batch file if CHK4RING or KILLTIME fails to run properly or either 
  120. is aborted.  Also, if any of the required files are not found.  
  121.  
  122. 19  GOFRONT
  123. Returns the TrapFax window to the foreground after a failure, so you can see 
  124. something's wrong. 
  125.